home *** CD-ROM | disk | FTP | other *** search
- The Amiga-Video Journal June 1991
- vol 2 issue 3
-
- 3D MODELING -"Earth Rise" - An Imagine Project
-
- by R.L. Kellogg, PhD
-
-
- Creating an animation of the rotating earth as seen from the moon
- was inspired by the incredible animation graphics of the PBS
- series "The Astronomers". Since the Amiga can also produce
- quality graphics and animation, I decided to create my own space
- art. The approach was conceptually simple: digitize a map of
- the earth and, using a 3D rendering program, wrap the image
- around a wireframe sphere. I would do the same thing again,
- creating an "atmosphere" of clouds for an extra effect. A
- digital "stage" could be set, hanging the rotating earth in a
- background of stars and filling the foreground with an image of
- lunar terrain.
-
-
- Step 1: Obtaining the Earth Map
-
-
- All of the maps of the earth in atlases, back issues of the
- National Geographic and airline travel magazines had too much
- printing and lettering. Fortunately, I found one map of the
- world that was simply an outline of continents. It was an easy
- matter using Digi-View (by NewTek) to digitize the map as a high
- resolution (640 x 400) image in "Line" mode, creating a 2-color
- map in only black and white. By adjusting the brightness
- control, I found a setting which clearly showed the continents.
-
- With DeluxePaint-III (by Electronic Arts) set to the HiRes 16-
- color mode, I loaded the 2-color map into the 16-color palette.
- I then adjusted the palette to provide a range of pastel colors
- for drawing yellow-tan deserts, brown mountain ranges, flat-green
- forests, and deep blue oceans.
-
- To insure that I only drew inside the continental boundries, I
- locked the blue ocean color with the "make stencil" command. This
- prevented any of my drawing from altering the ocean. Then for
- several hours I drew deserts, mountains, and forests, using
- National Geographic and several other atlases as a guide.
- Whenever I was able to make a feature that I liked, I used the
- brush command to replicate it. Mountain chains were easy that
- way! Sometimes I rotated and scaled (using the perspective) the
- brush to "fit" the geography. Every 15 minutes or so I would
- save my map to disk, in case of catastrophic failure. In an
- evening I had my artwork finished.
-
-
- Step 2: The Cloud Layer
-
-
- I wanted clouds over my earth to add some realism. In fact, I
- wanted the clouds as a separate layer just hovering over the
- earth. This meant that I needed to draw clouds which registered
- to the map that I had draw, but could be separated as a different
- rendering layer. Deluxe Paint III has a way of dealing with
- separate layers: it has a "fix" command to lock the screen image
- into an uneditable background. This command allows any new art
- work to be created on a separate foreground image plane while the
- background is still visible. I locked the finished earth map
- into the background and used the airbrush tool to spray on some
- white pixels to represent clouds. Then, I picked up those pixels
- as a series of small brushes and painted the clouds over the map.
- The polar regions were done in solid white, while desert areas
- were left untouched. I put clouds along the western edges of
- mountain chains and a tropical depression in the Indian Ocean.
- Short jerky motions with the mouse seemed to give the best "cloud
- effect", and I changed my brush often. Once finished, the entire
- cloud layer was transfered as a large brush to the alternate DP-
- III screen. Then, with the screen format requester, I collapsed
- the number of colors from 16 back to 2 and saved the cloud image,
- which now consisted of only white clouds and color zero
- background. For proper use in the 3D rendering program, I needed
- the colors reversed. I used the image utility Butcher (by Eagle
- Tree) to exchange the pixel order in the color registers and make
- the image a "negative" color. The final saved image was therefore
- made of black color zero clouds and white background.
-
-
- Step 3: Imagine
-
-
- God may have created the heaven and earth in six days, but to
- learn how to create images using Impulse's 3D rendering program
- "Imagine" takes considerably longer. But the effort is worth it,
- and after you get to know the program commands, Imagine becomes a
- very powerful 3D rendering program.
-
- First, I established a new project on disk df0: called
- "EarthAnim", and from the project screen made a new sub-project
- to hold the selected image renditions. The subproject was titled
- "EarthRise-Ham", and on initializing Imagine requests rendering
- information of rendering method, screen type, and path.
-
- EarthRise-Ham
- Rendering: Trace
- Picture: 320 x 400 Aspect 12:7
- Image File: ILBM-12 bit Ham-yes Hires-no Lace-yes
- Image Path: df0:Im_Pix/Ham
- Anim Path: hd0:EarthAnim ILBM
-
- Trace was chosen to correctly render the earth's semi-transparent
- atmosphere. The picture size and aspect were from Imagine's
- preset list for HAM display. The image file type, ILBM-12, was
- chosen to allow other HAM programs such as Digi-Paint (by New
- Tek) and the Art Department (by ASDG). The complete animation
- will not fit onto floppy disk, since each HAM image is about 40K
- bytes. In the next article, I'll discuss how to compress the
- animation in HiRes format to a file of about 900K bytes.
-
-
- Step 4: Creating the Earth
-
-
- The basic work of creating the earth and the lunar foreground is
- done in Imagine's Detail Editor. In each case an IFF image is
- wrapped onto a geometric shape. For the earth, it is a sphere.
- For the moon, it is a vertical plane.
-
- To start the formation of the earth, I chose "Add Sphere" from
- the Function Menu. In the viewing windows (called "quads") a
- small, orange circle appears, and in the perspective window a
- small wireframe globe appears. Moving the mouse to either the
- front, side, or top viewing quads and clicking on the center of
- the orange circle (the axis origin), I change the circle color to
- blue. Only when the object is blue, that is "pick/selected", can
- I manipulate, move, or transform it.
-
- Rather than use the interactive transformations, I needed a
- precise change in scale for this sphere. From the Object Menu, I
- select "Transformation" and a requestor appears. Within the
- transformation requestor I select size and set each x,y, and z
- axis to 100 units, and "Perform" the transformation. A large
- multifaceted sphere now greets me in the quad and perspective
- views. In summary, the transformation I performed was:
-
- Earth Sphere Transformation Properties
-
- size xyz= 100 100 100 position xyz= 0 0 0
-
-
- Step 4: Managing the Attributes
-
-
- This is by far the most challenging step. Not only must
- intrinsic color and texture properties be assigned to the budding
- earth sphere, but the extrinsic properties of the earth from the
- map image must be managed as well. With the earth sphere
- "pick/selected" (blue mode), I click on "attributes" of the
- Object menu. The following intrinsic properties were assigned:
-
- Earth Sphere Attribute Properties
-
- name: Earth
- color: 255/255/255 dither: 255
- reflect: 0/0/0 hardness: 5
- filter: 0/0/0
- specular: 100/125/175 index refraction: 1.00
-
- The specular color is essentially a blue-white highlight, which
- with the low value for hardness, will create a reflection
- highlight with a broad diffuse area. For this kind of an object,
- fairly high dithering is required to prevent "zoning" or "steps"
- in the color gradients of the final rendering.
-
- Special care must be taken with the earth map to insure that it
- wraps correctly around the sphere as a "brush attribute". The
- method is slightly different for a "wrap" that for a "flat"
- transfer. For the map, I wanted to wrap it around the sphere's
- z-axis. Therefore, clicking on the Brush-1 "brush attribute"
- box, the following extrinsic properties were assigned:
-
- Brush Attribute Properties
-
- brush name: df0:Im_Images/EarthMap-colormap.pic
- brush type: color
- wrap type: flat x
- wrap z
-
- The most difficult part of assigning the "brush attribute" is
- placing the brush axes onto the designated object. Since this is
- to be a "wrap", the z-axis of the brush needs to be near the z-
- axis of the object, the y-axis of the brush nearly non-existent,
- and the x-axis of the brush must extend slightly beyond the
- sphere's actual size. Within the "brush attributes" requestor, I
- chose the "transform" axis option to precise set the earth map
- axes:
-
- Brush Attribute Axis Transformation Properties
-
- size xyz= 110 4 300 position xyz= 0 -2 -150
-
- The x-axis was made slightly larger than the 100-unit earth
- sphere. The y-axis of the brush is nearly non existent. However,
- the brush y-axis position at -2 is very important, since the it
- needs to be ever so slightly to the left of the object axis. The
- z-axis of the brush is used for scaling the image, and the map is
- stretched upward depending upon the size of z. The position of
- the z-axis at -150 (that is, one half of 300) insures image
- symmetry with respect to the earth's equator.
-
- After "performing" the axes transformations, I always like to
- make a visual check. Still within the "brush attribute"
- requestor, I click on the "edit" option which allows interactive
- positioning (move, using the "m" key) or scaling (size, using the
- "s" key) or rotating (using the "r" key). A yellow set of axes
- appears over the earth sphere, showing the brush axes inside a
- rectangle. From the front view, the upper right quadrant of the
- axes rectangle should cover the right half of the sphere. In the
- top view, the axes rectangle should look like a long, thin box
- going horizontally through the middle of the sphere. Everything
- correct, I tap the "spacebar" and exit the "brush transformation"
- requestor and "brush attribute" requestors. The earth sphere is
- saved as df0:Objects/earth.obj. I use a convention of naming
- objects ".wire" if it is just a wireframe object or ".obj" if
- I've attached attributes.
-
-
- Step 5: An Onion Skin Atmosphere
-
-
- Clearing the Detail Editor, I created another wireframe sphere to
- hold the cloud image in a manner similar to the earth. However,
- the wireframe sphere will be slightly larger than the earth, for
- in the next step will slip over the earth just like a layer of
- onion skin. Therefore the size of the "Add Sphere" was 105 units
- in x,y, and z.
-
- Clouds Sphere Transformation Properties
-
- size xyz= 105 105 105 position xyz= 0 0 0
-
- The following intrinsic properties were assigned in the
- "attribute" requestor:
-
- Clouds Sphere Attribute Properties
-
- name: Earth-Clouds
- color: 255/255/255 dither: 255
- reflect: 0/0/0 hardness: 10
- filter: 0/0/0
- specular: 110/110/110 index refraction 1.4
-
- The atmosphere is made slightly harder that the earth beneath,
- and the index of refraction is set to 1.4. The index of
- refraction gives an exaggerated sense of depth between the earth
- and the clouds. Experimenting with the index of refraction can
- have some very exciting effects, especially if the earth and
- clouds are viewed from the night side. A glittering halo effect
- can be produced.
-
- The extrinsic properties of the clouds again come from a "brush"
- picture, but this time I use a "filter" brush rather than a
- "color" brush, to create a transparent atmosphere. Transparent,
- that is, except were color zero exists, which will reflect light
- just as real clouds.
-
- Brush Attribute Properties
-
- brush name: df0:Im_Images/EarthMap-clouds.pic
- brush type: filter
- wrap type: flat x
- wrap z
-
- The same kind of wrapping technique is used, but the brush axes
- are slightly larger to cover the larger wireframe sphere:
-
- Brush Attribute Axis Transformation Properties
-
- size xyz= 110 4 300 position xyz= 0 -2 -150
-
-
- Step 6: The Earth-Clouds Group
-
-
- The earth and atmosphere spheres with their attributes were saved
- separately as earth.obj and clouds.obj. Then, still in Imagine's
- Detail Editor, I load both objects at once and use the "Pick All"
- command from the Pick/Select Menu. With them both "picked",I
- grouped together using the "Group" command from the Object Menu.
- Both objects are now bright blue. This combine group of two
- spheres is saved as df0:Im_Objects/earth.grp. Now I can treat
- "earth.grp" as a single entity and think of it simply as the
- object "earth-clouds".
-
-
- Step 7: The Moon Picture
-
-
- Although Imagine offers 3D rendering of terrain (or importing
- terrain from programs such as Vista by Virtual Reality), I had a
- terrific 2D HiRes image of the lunar horizon from Apollo 15
- (which conincidentally is available from Virtual Reality). I
- wanted to use this image as a foreground "prop" on my 3D
- rendering stage. Therefore, in the Detail Editor I created a
- rectangular plane and pasted the picture of the moon onto it. To
- do this, I clicked on "Add Primitive" from the Function Menu and
- selected "Plane" within the Primitive Types Requestor. I created
- a plane with the following parameters:
-
-
- Plane Parameters: 200 width
- 50 height
- 5 horizontal sections
- 5 vertical sections
-
- After "pick/selecting" the plane, I attached the image of the
- moon horizon as a brush attribute:
-
- Plane Attribute Properties
-
- name: Moon
- color: 255/255/255 dither: 230
- reflect: 0/0/0 hardness: 0
- filter: 0/0/0
- specular: 0/0/0 index refraction 1.0
-
- Brush Attribute Properties
-
- brush name: df0:Im_Images/MoonHorizon.pic
- brush type: color
- wrap type: flat x
- flat z
-
- Since I just want to "paste" my moon picture onto this
- rectangular plane, the "wrap type" for both x and z was chosen as
- "flat-wrap". This means that the moon brush axes must have an
- origin just to outside the lower left-hand corner of the
- wireframe plane. The result was:
-
- Brush Attribute Axis
-
- size xyz= 404 4 250 position xyz= -202 -2 -52
-
- The x-axis was scaled to be just as long (wide) as the rectangle,
- and the z-axis about five times higher. The z-axis scale was
- done by trial and error to fit the moon horizon image into
- pleasant proportions onto the rectangular frame. The finished
- object with attributes was saved as df0:Im_Objects/moon.obj.
-
-
- Step 8: Actors Upon a Stage
-
-
- The metaphor of a "stage" in 3D rendering is very appropriate:
- the camera, objects, lightsources, etc. become actors which are
- positioned, moved or changed according to a director's script.
- Within Imagine's Stage Editor, the interactive stage is
- represented by the quad viewing windows and the director's script
- is represented by a frame to frame sequencer accessible from the
- "Action" command of the Object Menu.
-
- The following sequence prepared my stage for 64 frames of the
- rotating earth. I worked between the "Action" director and the
- interactive Stage Editor to position and align my objects.
- However, for this tutorial, all of the setup work can be done
- directly within the "Action" director.
-
-
- Step 9: Action, Action
-
-
- Clicking on "Action" in the Stage Editor's Object Menu, I enter
- the "Action" director screen. "Action" commands are selected at
- the top of the screen in command boxes. Going left to right
- across the screen are the frame numbers (with initially only one
- frame), and scrolling down the screen are the actors. Initially
- there are only two actors, "camera" and "global" (really a "stage
- hand" who represents global stage settings). Additional actors
- are inserted at the line called "new". Each actor has settings
- of "actor" name, "position", and "alignment". I'll ignore
- "hinge" and "F/X" (special effects) until another tutorial.
-
- a) I first click on the Highest Frame Number and change it from 1
- to 64. Across the "Action" field, the frame numbers 1 to 64
- appear.
-
- b) I add my cast of characters one at a time using the "Add"
- command. The first object I add is the earth. At the line of
- "new" object, at the intersection of "frame 1" and "actor" I
- click the mouse. Imagine expects two mouse clicks in the add
- mode: one for the starting frame and one for the ending frame.
- With my first click at frame 1 the "add" command becomes hatched.
- Then, using the scrolling bar, I find the intersection of "frame
- 64" and "actor". I click again. A red bar appears and fills the
- actor line from frames 1-64. Then a requestor asks for the kind
- of object I'm adding. The earth is a "normal object", which on
- the next requestor I identify by filename as
- df0:Im_Objects/earth.grp. No cycling or transitioning effects
- are required. Within the "Action" screen, the "new" actor is now
- automatically chrisened "Earth-Clouds", derived from earth.grp's
- attributes.
-
- c) I repeat this procedure, adding into frames 1-64 the new actor
- object df0:Im_Objects/moon.obj. It appears within the "Action"
- screen as actor "Moon".
-
- d) I add another new actor into frames 1-64, but the type object
- is "Light Source". At the requestor, I define it as a spherical
- light with full intensity of 255/255/255. Its stage name
- automatically becomes "Lightsource".
-
- e) I add a second spherical lightsource into frames 1-64, but
- click the requestor boxes for "Cast Shadows" and "Diminish
- Intensity". Full intensity is set at RGB of 200/200/200. Its
- stage name becomes "Lightsource.1"
-
- f) I add a final object into frames 1-64, but its type is simply
- "Axis". Its stage name automatically becomes "Track".
-
-
- Step 10: More Action
-
-
- Now, I switch back in the "Info" mode of the "Action" director.
- If I stopped here and went back to the Stage Editor, I'd find all
- my objects piled up on top of each other at the stage position
- xyz= 0,0,0. Therefore, I must move the actors to their proper
- positions.
-
- The earth will be "upstage" and slightly to the left. The camera
- will be a considerable distance "downstage". In the camera's
- foreground will be the rectangle holding the moon's horizon.
- Illumination for the earth will come from LightSource off to the
- right, giving the illusion of a gibbous earth. My other light,
- Lightsource.1 will closely illuminate the picture of the moon.
- Not wanting two "suns" to illuminate the earth, this light must
- be placed such that the moon picture blocks any of its light and
- only casts a shadow onto the earth. (That's the reason for it's
- "cast shadow" mode). Lastly, the Track axis will left at xyz=
- 0,0,0 as an object for the camera to point at.
-
- Remaining within the "Action" direction, and using the "Info"
- mode, I click on each of the actor's green "position" bar at
- frame 1 and change positions:
-
- a) Camera: xyz = 0 -1000 0
- b) Earth-Clouds xyz = -50 400 100
- c) Moon xyz = 0 -320 -80
- d) LightSource xyz = 1000 -250 100
- e) LightSource.1 xyz = 0 -600 -150
- f) Track xyz = 0 0 0
-
-
- Step 11: Point and Twist
-
-
- I'm almost done setting the stage. However, three of the actors
- need special attention while in the "Action" director:
-
- a) Camera: I delete the blue "align" bar at frame 1, switch to
- the "add" command and double click on the camera's frame 1 align.
- A requestor appears asking whether to Tween, Align or Track. I
- select "Track" and at the next requestor, inform Imagine that the
- camera should follow the Object Name "Track". No camera rotation
- is required.
-
- b) Earth-Clouds: I delete the blue "align" bar at frame 1, switch
- to the "add" command and click once on Earth-Clouds frame 1 align
- and then once on frame 32. To make the earth appear in different
- perspective rotations, I select "Tween" and at the next requestor
- inform Imagine that it must change the alignment in between
- frames 1-32 by z = 180 (degrees). This will sequentially rotate
- the earth over 32 frames from its inital alignment to half way
- around. I repeat this procedure, clicking once on frame 33's
- align and then once on frame 64. I select "Tween" again, but set
- the z axis of rotation to 360. This finishes the task of
- rotating the earth. Imagine's logic compensates for looping, so
- although frame 64 ends up exactly at 360 (zero) degrees rotation,
- frame 1 actually is adjusted to start at 5.625 (360/64) degrees.
-
- c) Global: Using the "Info" command, I click on the red "actor"
- bar at frame 1. The only global property I need to change is
- "Star Density" for the number of background stars which Imagine
- will automatically generate. A star density of .01 looks nice.
-
- I exit the "Action" director by clicking "Done"
-
-
- Step 12: What Does The Stage Look Like
-
-
- Within the interactive Stage Editor, I select from the Display
- Menu "Camera View". If I've done everything correctly in the
- "Action" director, the perspective view should show a wireframe
- earth slightly above and to the left of center. The bottom half
- of the view should be covered by the moon-plane's rectangular
- mesh. If everything appears to be in its proper position, I
- select "Last Frame" from the Frame Menu" and check again. In
- creating animations sometimes I managed to lose my actors. If an
- actor is missing, I return to the "Action" director and check
- that the actor's line goes completely between frame 1 and 64
- (camera and global are the exception).
-
- Before leaving the Stage Editor, I "Save Changes" from the
- Project Menu. I've forgotten to do this more than once, and it
- is very disheartening to lose the results of all this stage
- planning.
-
-
- Step 13: Rendering.
-
-
- In the Project Editor, I alway render one test frame before
- rendering the entire set of images. At 10 minutes per image (on
- a 28 MHz machine), that's a little over 10 hours for a 64 frame
- animation. Therefore, caution is warranted. I select frame 14
- and click on "Generate". When complete, an asterick (*) appears
- below frame 1. Now comes the moment of truth. With frame 14
- still selected, I click on "Show". Moments later I'm seeing a
- HAM image of the earth rising above the moon's horizon.
-
- By my subproject specification, this picture was automatically
- stored as df0:Im_Pix/Ham/pic.0014. The directory path to a floppy
- disk is inadequate for holding the complete animation. I can
- check my animation directory path for this subproject clicking
- on the "Modify" box of the Project Editor. Large frame
- renderings can be only done on a path to hard disk. My selected
- directory path is hd0:EarthAnim. Confident of my results, I
- select the range of frames 1-64 and click "Generate". See you in
- the morning!
-
- If you would like a disc containing a copy of the earth map,
- cloud layer and moon horizon images; the earth, clouds, and moon
- objects and the completed "Imagine" 3D rendering stage; and the
- completed rendering of frame #14 as Ham, HamE, HiRes, and ILBM-24
- of this animation, send $5.00 to cover postage and handling to:
-
- First Principles
- Dr. Robert L. Kellogg
- 7509 Dew Wood Drive
- Rockville, MD 20855
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-